<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.zz.bsea.service.UserService" %>
<%@ page import="com.zz.bsea.entity.User" %>
<%@ page import="java.util.List" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
String uname=(String)session.getAttribute("loginname");
if(uname==null){
	response.sendRedirect("/java11/BseaLogin.jsp");
}
%>
<h1>欢迎 <%=uname %>登录</h1>
<%
UserService us=new UserService();
List<User> ls=us.showAll();

%>

<table border="1">
<tr>
<th>序号id</th>
<th>用户名</th>
<th>密码</th>
</tr>
<%
for(User user:ls){
	

%>
    <tr>
        <td><%=user.getId() %></td>
        <td><%=user.getName() %></td>
        <td><%=user.getPassword() %></td>
        
      
    </tr>
   <%
}
   %> 
</table>
</body>
</html>